
const db = require('db');

module.exports = async ctx => {
    const { connection, comply } = db.init();
    try {
        ctx.body = await comply(`SELECT * FROM settlement`);
        ctx.status = 200;
    } catch (error) {
        ctx.status = 500;
        ctx.body = error;
    }

    connection.end();
}
